3.289 \(\int \cos ^5(e+f x) (b \csc (e+f x))^n \, dx\)

Optimal. Leaf size=78 \[ \frac {b^5 (b \csc (e+f x))^{n-5}}{f (5-n)}-\frac {2 b^3 (b \csc (e+f x))^{n-3}}{f (3-n)}+\frac {b (b \csc (e+f x))^{n-1}}{f (1-n)} \]

[Out]

b^5*(b*csc(f*x+e))^(-5+n)/f/(5-n)-2*b^3*(b*csc(f*x+e))^(-3+n)/f/(3-n)+b*(b*csc(f*x+e))^(-1+n)/f/(1-n)

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 78, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {2621, 270} \[ \frac {b^5 (b \csc (e+f x))^{n-5}}{f (5-n)}-\frac {2 b^3 (b \csc (e+f x))^{n-3}}{f (3-n)}+\frac {b (b \csc (e+f x))^{n-1}}{f (1-n)} \]

Antiderivative was successfully verified.

[In]

Int[Cos[e + f*x]^5*(b*Csc[e + f*x])^n,x]

[Out]

(b^5*(b*Csc[e + f*x])^(-5 + n))/(f*(5 - n)) - (2*b^3*(b*Csc[e + f*x])^(-3 + n))/(f*(3 - n)) + (b*(b*Csc[e + f*
x])^(-1 + n))/(f*(1 - n))

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 2621

Int[(csc[(e_.) + (f_.)*(x_)]*(a_.))^(m_)*sec[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(f*a^n)^(-1), Subst
[Int[x^(m + n - 1)/(-1 + x^2/a^2)^((n + 1)/2), x], x, a*Csc[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && Integer
Q[(n + 1)/2] &&  !(IntegerQ[(m + 1)/2] && LtQ[0, m, n])

Rubi steps

\begin {align*} \int \cos ^5(e+f x) (b \csc (e+f x))^n \, dx &=-\frac {b^5 \operatorname {Subst}\left (\int x^{-6+n} \left (-1+\frac {x^2}{b^2}\right )^2 \, dx,x,b \csc (e+f x)\right )}{f}\\ &=-\frac {b^5 \operatorname {Subst}\left (\int \left (x^{-6+n}-\frac {2 x^{-4+n}}{b^2}+\frac {x^{-2+n}}{b^4}\right ) \, dx,x,b \csc (e+f x)\right )}{f}\\ &=\frac {b^5 (b \csc (e+f x))^{-5+n}}{f (5-n)}-\frac {2 b^3 (b \csc (e+f x))^{-3+n}}{f (3-n)}+\frac {b (b \csc (e+f x))^{-1+n}}{f (1-n)}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.56, size = 81, normalized size = 1.04 \[ -\frac {\sin ^5(e+f x) \left (\left (n^2-8 n+15\right ) \csc ^4(e+f x)-2 \left (n^2-6 n+5\right ) \csc ^2(e+f x)+n^2-4 n+3\right ) (b \csc (e+f x))^n}{f (n-5) (n-3) (n-1)} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[e + f*x]^5*(b*Csc[e + f*x])^n,x]

[Out]

-(((b*Csc[e + f*x])^n*(3 - 4*n + n^2 - 2*(5 - 6*n + n^2)*Csc[e + f*x]^2 + (15 - 8*n + n^2)*Csc[e + f*x]^4)*Sin
[e + f*x]^5)/(f*(-5 + n)*(-3 + n)*(-1 + n)))

________________________________________________________________________________________

fricas [A]  time = 1.08, size = 73, normalized size = 0.94 \[ -\frac {{\left ({\left (n^{2} - 4 \, n + 3\right )} \cos \left (f x + e\right )^{4} - 4 \, {\left (n - 1\right )} \cos \left (f x + e\right )^{2} + 8\right )} \left (\frac {b}{\sin \left (f x + e\right )}\right )^{n} \sin \left (f x + e\right )}{f n^{3} - 9 \, f n^{2} + 23 \, f n - 15 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^5*(b*csc(f*x+e))^n,x, algorithm="fricas")

[Out]

-((n^2 - 4*n + 3)*cos(f*x + e)^4 - 4*(n - 1)*cos(f*x + e)^2 + 8)*(b/sin(f*x + e))^n*sin(f*x + e)/(f*n^3 - 9*f*
n^2 + 23*f*n - 15*f)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (b \csc \left (f x + e\right )\right )^{n} \cos \left (f x + e\right )^{5}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^5*(b*csc(f*x+e))^n,x, algorithm="giac")

[Out]

integrate((b*csc(f*x + e))^n*cos(f*x + e)^5, x)

________________________________________________________________________________________

maple [F]  time = 4.43, size = 0, normalized size = 0.00 \[ \int \left (\cos ^{5}\left (f x +e \right )\right ) \left (b \csc \left (f x +e \right )\right )^{n}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(f*x+e)^5*(b*csc(f*x+e))^n,x)

[Out]

int(cos(f*x+e)^5*(b*csc(f*x+e))^n,x)

________________________________________________________________________________________

maxima [A]  time = 0.69, size = 86, normalized size = 1.10 \[ -\frac {\frac {b^{n} \sin \left (f x + e\right )^{-n} \sin \left (f x + e\right )^{5}}{n - 5} - \frac {2 \, b^{n} \sin \left (f x + e\right )^{-n} \sin \left (f x + e\right )^{3}}{n - 3} + \frac {b^{n} \sin \left (f x + e\right )^{-n} \sin \left (f x + e\right )}{n - 1}}{f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)^5*(b*csc(f*x+e))^n,x, algorithm="maxima")

[Out]

-(b^n*sin(f*x + e)^(-n)*sin(f*x + e)^5/(n - 5) - 2*b^n*sin(f*x + e)^(-n)*sin(f*x + e)^3/(n - 3) + b^n*sin(f*x
+ e)^(-n)*sin(f*x + e)/(n - 1))/f

________________________________________________________________________________________

mupad [B]  time = 1.41, size = 134, normalized size = 1.72 \[ -\frac {{\left (\frac {b}{\sin \left (e+f\,x\right )}\right )}^n\,\left (150\,\sin \left (e+f\,x\right )+25\,\sin \left (3\,e+3\,f\,x\right )+3\,\sin \left (5\,e+5\,f\,x\right )+3\,n^2\,\sin \left (3\,e+3\,f\,x\right )+n^2\,\sin \left (5\,e+5\,f\,x\right )-24\,n\,\sin \left (e+f\,x\right )-28\,n\,\sin \left (3\,e+3\,f\,x\right )-4\,n\,\sin \left (5\,e+5\,f\,x\right )+2\,n^2\,\sin \left (e+f\,x\right )\right )}{16\,f\,\left (n^3-9\,n^2+23\,n-15\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(e + f*x)^5*(b/sin(e + f*x))^n,x)

[Out]

-((b/sin(e + f*x))^n*(150*sin(e + f*x) + 25*sin(3*e + 3*f*x) + 3*sin(5*e + 5*f*x) + 3*n^2*sin(3*e + 3*f*x) + n
^2*sin(5*e + 5*f*x) - 24*n*sin(e + f*x) - 28*n*sin(3*e + 3*f*x) - 4*n*sin(5*e + 5*f*x) + 2*n^2*sin(e + f*x)))/
(16*f*(23*n - 9*n^2 + n^3 - 15))

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(f*x+e)**5*(b*csc(f*x+e))**n,x)

[Out]

Timed out

________________________________________________________________________________________